package br.edu.ifpb.sejabemvindo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

public class SplashActivity extends Activity implements Runnable {

	private static int SPLASH_TIME_OUT = 40000;
	
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        // Informar o Layout.
        setContentView(R.layout.activity_splash);
        
        // Agendar mensagens e Threads a serem executadas.
        Handler handler = new Handler();
        handler.postDelayed(this, SPLASH_TIME_OUT);
    }

	@Override
	public void run() {
		Intent intent = new Intent(this, MainActivity.class);
		startActivity(intent);
		finish();	
	}
}
